{template 'public/header'}
{template 'public/comhead'}
<link rel="stylesheet" type="text/css" href="../addons/zh_tcwq/template/public/ygcsslist.css">
<ul class="nav nav-tabs">
    <span class="ygxian"></span>
    <div class="ygdangq">当前位置:</div> 
    
    <li class="active"><a href="{php echo $this->createWebUrl('label',array('type2_id'=>$_GPC['type2_id']))}">标签管理</a></li>
    <li><a href="{php echo $this->createWebUrl('addlabel',array('type2_id'=>$_GPC['type2_id']))}">添加/编辑标签</a></li>
    <li ><a href="{php echo $this->createWebUrl('type2');}">返回二级栏目列表</a></li>   
</ul>
<div class="main"> 
    <div class="panel panel-default">
        <div class="panel-heading">
            分类列表
        </div>
        <div class="panel-body" style="padding: 0px 15px;">
            <div class="row">              
                <table class="yg5_tabel col-md-12">
                    <tr class="yg5_tr1">
                        <th class="store_td1">id</th>
                        <th>标签名称</th>
                        <th>操作</th>
                        <th>查看</th>
                    </tr>
                     {loop $list $key $item}
              <tr class="yg5_tr2">
                <td>
                {$item['id']}
                </td>
               
                <td>
                {$item['label_name']}
                </td>
             
                <td>
                  <button type="button" class="btn btn-danger btn-sm" data-toggle="modal" data-target="#myModal{$item['id']}">删</button>
                </td>
                <td>
                <a class="btn btn-warning btn-sm" href="{php echo $this->createWebUrl('addlabel',array('id'=>$item['id'],'type2_id'=>$_GPC['type2_id']));}">编辑</a>
                </td>
               <!--  <td> {$pager}</td> -->
              </tr>
               <div class="modal fade" id="myModal{$item['id']}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                      <div class="modal-dialog" role="document">
                        <div class="modal-content">
                          <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <h4 class="modal-title" id="myModalLabel" style="font-size: 20px;">提示</h4>
                        </div>
                        <div class="modal-body" style="font-size: 20px">
                            确定删除么？
                        </div>
                        <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                            <a href="{php echo $this->createWebUrl('label', array('op'=>'del','id'=>$item['id'],'type2_id'=>$_GPC['type2_id']));}" type="button" class="btn btn-info" >确定</a>
                        </div>
                    </div>
                </div>
            </div>
               {/loop}
              
              {if empty($list)}
             <tr class="yg5_tr2">
                <td  colspan="4">
                  尚未添加标签
                </td>
              </tr>
             
              {/if}
          </table>
        </div>
      </div>
    </div>
  
</div>

<script type="text/javascript">
    $(function(){
        $("#frame-1").show();
        $("#yframe-1").addClass("wyactive");
      })
</script>